#pragma once
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>

class hexstringconvert
{
public:
	virtual int bytesfilereverse(const char *hexfilepath, const char *stringfilepath);
	virtual int hexfile2stringfile(const char *hexfilepath, const char *stringfilepath);
	virtual int stringfile2hexfile(const char *hexfilepath, const char *stringfilepath);
	virtual int hex2hextablfile(const char *hexfilepath, const char *stringfilepath);
private:
	int bytesreverse(unsigned char *io_data, int length);
	std::string hex2string(char *pHex, int nLen);
	int string2hex(char* string, int i_length, unsigned char *hex, int* o_length);
	std::string hex2hextabl(unsigned char* hex, int length);
};
